How To Extract Patterns From Strings Using Regex Groups